﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using ServicesComponent.Repositories.Core;
using Business_Objects;
using Data_Objects;
namespace ServicesComponent.Repositories
{
    ///// <summary>
    ///// DanhMucThuChi Repository. Good example of CRUD operations.
    ///// </summary>
    public class DanhMucThuChiRepository : IDanhMucThuChiRepository
    {
        private static readonly IDanhMucThuChiDao _danhMucThuChi = DataAccess.DanhMucThuChiDao;
        public List<DanhMucThuChi> GetList()
        {
            return _danhMucThuChi.GetDanhMucThuChi().ToList();
        }

        public DanhMucThuChi Get(string id)
        {
            return _danhMucThuChi.GetDanhMucThuChiByID(id);
        }

        public void Insert(DanhMucThuChi t)
        {
            _danhMucThuChi.InsertDanhMucThuChi(t);
        }

        public void Update(DanhMucThuChi t)
        {
            _danhMucThuChi.UpdateDanhMucThuChi(t);
        }

        public void Delete(DanhMucThuChi t)
        {
            _danhMucThuChi.DeleteDanhMucThuChi(t);
        }

        public List<DanhMucThuChi> GetDanhMucThuChiBySchoolId(int schoolId) 
        {
            return _danhMucThuChi.GetDanhMucThuChiBySchoolId(schoolId);
        }
    }
}